import ajax from '@/request/ajax.js'
import qs from 'qs'


const api = {
  addMsg: '/admin/addMsg',   //添加
  search: '/admin/searchHobby',
  detail: '/admin/detail'
}



// export const detail = data => ajax({
//   url: api.detail,
//   method: 'POST',
//   data: data
//   // headers: {
//   //   'Content-Type': 'application/x-www-form-urlencoded'
//   // },
//   // data: qs.stringify(data)
// })

export const addMsg = data => ajax({
  url: api.addMsg,
  method: 'POST',
  data: data
})

export const search = data => ajax({
  url: api.search,
  method: 'POST',
  data: data
})

export const detail = data => ajax({
  url: api.detail,
  method: 'POST',
  data: data
})